package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import edu.calvin.cs214.hobbes2008.IntegerTIR;


public class FactorialPrimitiveTest {
	@Test
	public void shouldApplyFactorial(){
		assertEquals(new IntegerTIR(2), new FactorialPrimitive().apply(new IntegerTIR(2)));
		assertEquals(new IntegerTIR(120), new FactorialPrimitive().apply(new IntegerTIR(5)));
		assertEquals(new IntegerTIR(720), new FactorialPrimitive().apply(new IntegerTIR(6)));
	}

}
